﻿<%@ Page Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="index.aspx.cs"
    Inherits="MasterPageGroupF3.indexHCM" Title="Untitled Page" %>
    <%@ Import Namespace="DTO" %>
    <%@ Import Namespace="BUS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <ul class="clsmenuul">
        <li class="active"><a href="index.aspx">GIÁ TỐT HÔM NAY </a></li>
        <li><a href="GiaTotGanDay.aspx">GIÁ TỐT GẦN ĐÂY</a> </li>
        <li><a href="GiaTotSapToi.aspx">GIÁ TỐT SẮP TỚI</a> </li>
         <% if (Session["Provider"] != null)
            {%>
                <li><a href="DangTinKhuyenMai.aspx">ĐĂNG TIN KHUYẾN MÃI</a> </li> 
                 <li><a href="DanhSachDonDatHang.aspx">DS ĐƠN ĐẶT HÀNG</a> </li>
           <%}
            if (Session["UserName"] != null)
            {%>
                <li><a href="LichSuMuaHang.aspx">LỊCH SỬ MUA HÀNG</a> </li> 
                 <li><a href="TinhTrangDonHang.aspx">TÌNH TRẠNG ĐƠN HÀNG</a> </li>
            <%} %>
        <li><a href="ThaoLuan.aspx">THẢO LUẬN</a> </li>
        <li><a href="TroGiup.aspx">TRỢ GIÚP</a> </li>        
    </ul>    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <%                        
        PRODUCT temp = PRODUCTBUS.LayRan1SanPhamCo(2,DateTime.Now.Date);
        int TietKiem = (int)temp.PRICE * (int)temp.RATE_DECREASE / 100;
        int ConLai = (int)temp.PRICE - TietKiem;        
    %>
    <div class="leftboxtop">
        <img src="../skin/frontend/default/inspire-blue/images/contenttop.png" width="706" height="13"
            alt="2columns-right" />
    </div>
    <div class="contpad clearfix">
        <p>
            <div class="leftcontent">
                <div class="topcontent clearfix">
                    <h1>
                        Giá tốt hôm nay: <span><%Response.Write(temp.SLOGAN); %></span></h1>
                </div>
                <fieldset class="no-display">
                    <input type="hidden" name="product" value="7" />
                    <input type="hidden" name="related_product" id="related-products-field" value="" />
                </fieldset>
                <div class="left_column">
                    <div class="buynowbox">
                        <img src="../skin/frontend/default/inspire-blue/images/leftboxtop.jpg" width="226" height="10"
                            alt="leftbox top" />
                        <div class="leftbox_middle">
                            <div class="buynow_value ">
                                <h4>
                                    <span class="price_value style5"> <%Response.Write(XuLyChuoiTien.ConvertMoney(ConLai)); %> VND</span> <a href='#' id="scriptbuynow"
                                        class="buynowbtn">
                                        <asp:ImageButton ID="ImageButton1" runat="server" width="100"
                                            height="50" 
                                        ImageUrl="~/skin/frontend/default/inspire-blue/images/buy_btn.png" 
                                        onclick="ImageButton1_Click"/>
                                        
                                    </a>
                                </h4>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="dicount-boxes clearfix">
                                <div class="clsdiscount_prices">                                    
                                    <span>Giá trị:</span> <span class="clsnamediscountprices"><%Response.Write(XuLyChuoiTien.ConvertMoney((int)temp.PRICE)); %> VND</span>
                                </div>
                                <div class="clsdiscount_prices">
                                    <span>Giảm giá:</span> <span class="clsnamediscountprices"><%Response.Write(XuLyChuoiTien.ConvertMoney((int)temp.RATE_DECREASE)); %> %</span>
                                </div>
                                <div class="clsdiscount_prices">
                                    <span>Tiết kiệm:</span> <span class="clsnamediscountprices"><%Response.Write(XuLyChuoiTien.ConvertMoney(TietKiem)); %> VND</span>
                                </div>
                                <div class="clear">
                                </div>
                                <div>
                                    <img src="../skin/frontend/default/inspire-blue/images/gift.png" width="34" height="31"
                                        alt="gift" title="gift" class="clsgiftimg" />
                                    <span class="buy_friend"><a onclick="" class="clsbuyfriend">Mua tặng bạn bè</a></span>
                                </div>
                            </div>
                        </div>
                        <div class="clsbottomspace">
                            <img src="../skin/frontend/default/inspire-blue/images/leftboxbottom.jpg" width="226"
                                height="10" alt="leftbox bottom" />
                        </div>
                        <!-- Deal Bought-->
                        <div class="clsspace">
                            <img src="../skin/frontend/default/inspire-blue/images/leftboxtop.jpg" width="226" height="10"
                                alt="leftboxtop" /></div>
                        <div class="dealstatus">
                            <div class="totalcount">
                                Có 2 người mua</div>
                            <div class="deal_status" id="deal_status">
                                <img src="../skin/frontend/default/inspire-blue/images/1.png" width="180" height="16"
                                    alt="Rate" title="Rate" class="statusimg" />
                                <div class="clsstatus">
                                    Còn 48 cơ hội</div>
                            </div>
                        </div>
                        <div class="clsbottomspace">
                            <img src="../skin/frontend/default/inspire-blue/images/leftboxbottom.jpg" width="226"
                                height="10" alt="leftbox bottom" /></div>
                        <!-- Deal Bought-->
                        <!--Time box-->                                                    
                        <% 
                            DateTime timeStop = Convert.ToDateTime(temp.TIME_STOP);
                            DateTime timeCur = DateTime.Now.Date;
                        %>                             
                        <input id="Time_Stop" type="hidden" value="<%Response.Write(timeStop.ToString("MM/dd/yy HH:mm:ss")); %>" />
                        <input id="Time_Cur" type="hidden" value="<%Response.Write(timeCur.ToString("MM/dd/yy HH:mm:ss")); %>" />
                        <script type="text/javascript">
                            //var targetdate = "06/15/11 09:06:00";
                            var targetdate = document.getElementById("Time_Stop").value;
                            var startdate = document.getElementById("Time_Cur").value;                            
                            var dealimage = "../skin/frontend/default/inspire-blue/images/8.jpg";
                            var buynowreplace = "../skin/frontend/default/inspire-blue/images/8.jpg";
                        </script>

                        <div class="timerbg_middle clearfix">
                            <span class="corner_img"></span>
                            <div class="deal_statusnew">
                                <h4>
                                    Thời gian còn lại
                                    </h4>
                                <div class="timerbox">
                                    <div class="viraiterbg">

                                        <script type="text/javascript" src="../skin/frontend/default/inspire-blue/js/timer.js"></script>

                                    </div>
                                    <div class="timerulbox clearfix">
                                        <ul>
                                            <li class="clstimerbg"><strong>Giờ</strong></li>
                                            <li class="clstimerbg"><strong>Phút</strong></li>
                                            <li class="clstimerbg"><strong>Giây</strong></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--End of Time box-->
                <!--Fine Print and Highlights-->
                <div class="right_column">
                    <!--Share Icons-->

                    <script type="text/javascript" src="../skin/frontend/default/default/js/swfobject.js"></script>

                    <!--End Share Icons-->
                    <div class="banner_middle" style="display: none" id='video'>
                        <div name='mediaspace' id='mediaspace' class='mediaspace'>
                            <embed type="application/x-shockwave-flash" src="../skin/frontend/default/default/hdflvplayer/hdplayer.swf"
                                width="440" height="276" id="player" name="player" bgcolor="expressInstall.swf"
                                quality="high" allowfullscreen="true" allowscriptaccess="always" wmode="transparent"
                                flashvars="baserefM=/&id=1&pid=7" />
                        </div>
                    </div>
                    <div id="featured" style="display: block; width: 435px; height: 276px;">
                        <div class="banner_middle" id='image'>
                            <% 
                                for (int i = 1; i < 4; i++)
                                {
                            %>
                                    <img src='<% Response.Write("images/product/" + temp.IDPRODUCT.ToString() + "/" + i.ToString() + ".jpg"); %>' width="440" height="276"/>                            
                                    <%} %>
                        </div>
                    </div>

                    <script type="text/javascript">
                        $j('#featured').orbit({
                            'bullets': true,
                            'timer': true,
                            'animation': 'fade',
                            'captions': false,
                            'directionalNav': false
                        });
                    </script>

                    <script type="text/javascript">
                        function switchImage() {
                            document.getElementById('video').style.display = "none";
                            document.getElementById('image').style.display = "block";
                            document.getElementById('switchVideo').style.display = "block";
                            document.getElementById('switchImage').style.display = "none";
                            document.getElementById('featured').style.display = "block";
                            document.getElementById('featured').style.width = "440px";
                            document.getElementById('featured').style.height = "276px";
                        }                            
                    </script>

                    <div class="bottom clearfix">
                        <div class="spread clearfix">
                            <span class="floatleft">Chia sẽ bạn bè:</span> <span class="sharelinks"><a class="links"
                                title="Twitter Share" href="http://twitter.com/home/"
                                target="_blank">
                                <img src="../skin/frontend/default/inspire-blue/images/twitter-small.png" width="16"
                                    height="16" alt="twitter" title="twitter" /></a> <a class="links" title="Facebook Share"
                                        href="" target="_blank">
                                        <img src="../skin/frontend/default/inspire-blue/images/facebook-small.png" width="16"
                                            height="16" alt="facebook" title="facebook" /></a> <a class="links" title="Mail Share"
                                                href="mailto:?body=People
                                                <img src="../skin/frontend/default/inspire-blue/images/mail-small.png" width="16" height="16"
                                                    alt="Mail" title="Mail" /></a> 
                                                    <iframe src="http://www.facebook.com/plugins/like.php?href=YOUR_URL"
        scrolling="no" frameborder="0"
        style="border:none; width:100px; height:20px"></iframe>
        </span>
                        </div>
                        <div class="switch">
                            <input class="change" type="button" value="Hình ảnh" id="switchImage" style="display: none;"
                                onclick="switchImage()" />&nbsp;
                        </div>
                    </div>
                    <div class="clsfineprint">
                        <h3>
                            Điều kiện</h3>
                        <span class="deal_content"><% Response.Write(temp.CONDITION); %></span>
                    </div>
                    <div class="highlights">
                        <h3>
                            Điểm nổi bật</h3>
                            <span class="deal_content"><% Response.Write(temp.HIGHLIGHT); %></span>
                        <%--<ul>
                            <li>xxxxx</li>
                            <li>yyyy</li>
                            <li>zzzzz</li>
                            <li>tttttt</li>
                        </ul>--%>
                    </div>
                </div>
                <!--end of Fine Print and Highlights-->
                <div class="clear">
                </div>
            </div>
            <!-- NO Deal available-->
            <!--No Deal Availbale-->

            <script type="text/javascript">                decorateList('products-list', 'none-recursive')</script>
    </div>
    <img src="../skin/frontend/default/inspire-blue/images/contentbottom.gif" width="706"
        height="10" alt="contentbottom" />
    <!--end of first content box-->
    <div class="clsspace" style="padding: 7px 0 0 0;">
        <img src="../skin/frontend/default/inspire-blue/images/contenttop.png" width="706" height="10"
            alt="contenttop" /></div>
    <div class="reviewbox" style="width: 706px;">
        <div class="bottombox clearfix">
            <div class="bottomleftbox ">
                <div class="description-reviews">
                    <h4 class="clstitle1">
                        Thông tin</h4>
                    <div class="clsdescription">
                        
                        <p class="deal_content"><% Response.Write(temp.CONTENT); %></p>
                        <%--<p class="deal_content">aaaaaaaaaaaaaaaaaaaaaa</p>
                        <p class="deal_content">aaaaaaaaaaaaaaaaaaaaaa</p>
                        <p class="deal_content">aaaaaaaaaaaaaaaaaaaaaa</p>--%>
                    </div>
                </div>
            </div>
            <div class="bottomrightbox">
                <div class="company-details">
                    <h3>
                        The Company</h3>
                    <address class="deal_content">
                    <% Response.Write(temp.PROVIDER.ADDRESS); %>
                        <%--KHTN, 227 nguyễn văn cừ,
                        <br />
                        q 5, HCM<br />--%>
                    </address>
                    <br />
                    <div id="map_canvas" style="width: 220px; height: 300px">
                        <img src='<% Response.Write("images/product/" + temp.IDPRODUCT.ToString() + "/map.jpeg"); %>' width="220px" height="300px" />
                    </div>
                </div>
            </div>
        </div>
    </div>        
    <img src="../skin/frontend/default/inspire-blue/images/contentbottom.png" width="706"
        height="13" alt="2columns-right" />
</asp:Content>
